package com.enjoyor.soa.traffic.restt.tpcms.dubbo.impl;

import java.util.List;
import com.alibaba.dubbo.config.annotation.Reference;
import com.enjoyor.soa.traffic.api.dto.tpcms.InfoWhiteListDto;
import com.enjoyor.soa.traffic.api.service.dubbo.tpcms.IDubboWhiteListService;
import com.enjoyor.soa.traffic.restt.tpcms.dubbo.IWhiteListConsumeService;
import com.enjoyor.soa.traffic.util.pojo.Page;
import com.enjoyor.soa.traffic.util.pojo.ResultPojo;

import org.springframework.stereotype.Component;

@Component
public class WhiteListConsumeService implements IWhiteListConsumeService {

    @Reference(version = "1.0.0", timeout = 10000)
    private IDubboWhiteListService dubboWhiteListService;

    @SuppressWarnings("rawtypes")
    @Override
    public ResultPojo getWhiteListPage(Page page) {
        return dubboWhiteListService.getWhiteListPage(page);
    }

    @Override
    public ResultPojo getWhiteListList(String whiteListId, String licenseNumber, String licenseTypeId,
            String vehicleTypeId, String funTypeId, String vehicleDept) {
        return dubboWhiteListService.getWhiteListList(whiteListId, licenseNumber, licenseTypeId, vehicleTypeId,
                funTypeId, vehicleDept);
    }

    @Override
    public ResultPojo insertWhiteList(InfoWhiteListDto infoWhiteList, String userName) {
        return dubboWhiteListService.insertWhiteList(infoWhiteList, userName);
    }

    @Override
    public ResultPojo editWhiteList(InfoWhiteListDto infoWhiteList, String userName) {
        return dubboWhiteListService.editWhiteList(infoWhiteList, userName);
    }

    @Override
    public ResultPojo deleteWhiteList(String whiteListId, String userName) {
        return dubboWhiteListService.deleteWhiteList(whiteListId, userName);
    }

    @Override
    public ResultPojo insertBatch(List<InfoWhiteListDto> whiteLists, String userName) {
        return dubboWhiteListService.insertBatch(whiteLists, userName);
    }

}
